const username = process.argv[2];
const password = process.argv[3];

if (!username || !password) {
    console.log('请提供用户名和密码');
    process.exit(1);
}

// 创建包含用户名和密码的Buffer
const credentials = Buffer.from(`${username}:${password}`);

// 转换为base64编码
const base64Str = credentials.toString('base64');

console.log('用户名：' + username);
console.log('密码：' + password);
console.log('base64编码：' + base64Str);